public class Shopping_cart {
    public int unit_price;
    public int number;

    public static void pay(int number){
        if(number == 1){
            System.out.println("购买1件商品的价格为："+580);
        }
    }
    public static void pay(int number,int unit_price){
        if(number == 1){
            pay(1);
        }else{
            System.out.println("购买"+number+"件商品的价格为："+unit_price*number*0.8);
        }
    }

    public static void main(String[] args){
        pay(1);
        pay(1,580);
        pay(10,580);
    }
}
